package com.dycx.message.dto;

import com.baomidou.mybatisplus.core.injector.methods.Insert;
import com.dycx.common.constants.RegexpConstants;
import com.dycx.common.dto.PageDTO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 验证码(VerificationCode)参数类
 *
 * @author wuzongbin
 * @since 2024-01-12 10:39:27
 */

@Data
public class SendVerificationCodeDTO implements Serializable {


    /**
     * 手机号
     */
    @NotBlank(message = "手机号码不能为空", groups = {Insert.class})
    @Length(min = 11, max = 11, message = "手机号只能为11位")
    @Pattern(regexp = RegexpConstants.MOBILE, message = "手机号格式有误")
    private String mobile;

    /**
     * 图形验证码
     */
    @NotBlank(message = "图形验证码不能为空", groups = {Insert.class})
    private String kaptchaCode;

    /**
     * 图形验证码token
     */
    @NotBlank(message = "图形验证码标识不能为空", groups = {Insert.class})
    private String kaptchaToken;


}
